package com.github.aloxc.plugin.restplus.listener;

import com.github.aloxc.plugin.restplus.component.VariateTableModel;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Vector;

public class EnvironmentAddListener implements ActionListener {
    private JTable envTable;

    public EnvironmentAddListener(JTable envTable){
        this.envTable = envTable;
    }
    @Override
    public void actionPerformed(ActionEvent e) {
        VariateTableModel model = (VariateTableModel) envTable.getModel();
        model.addRow(new Vector(){{
            add(false);
            add("");
            add("");
            add("");
            add(false);
        }});
    }
}
